﻿using ModelLayer;
using System.Collections.Generic;

namespace ControllerLayer
{
    internal interface IStationCtr
    {
        /// <summary>
        /// Adds a battery to a station.
        /// </summary>
        /// <param name="stationId">The identifier.</param>
        void AddBattery(long stationId);

        /// <summary>
        /// Removes the battery.
        /// </summary>
        /// <param name="stationId">The station identifier.</param>
        /// <returns><c>true</c> if battery could be removed, <c>false</c> otherwise.</returns>
        bool RemoveBattery(long stationId);

        /// <summary>
        /// Gets the batteries on a station.
        /// </summary>
        /// <param name="stationId">The station identifier.</param>
        /// <returns>System.Int32.</returns>
        int GetBatteries(long stationId);

        /// <summary>
        /// Sets the batteries on a station.
        /// </summary>
        /// <param name="stationId">The station identifier.</param>
        /// <param name="number">The number of batterues.</param>
        void SetBatteries(long stationId, int number);

        /// <summary>
        /// Creates a station in the database.
        /// </summary>
        /// <param name="station">The station.</param>
        /// <returns>The number of rows affected</returns>
        int CreateStation(Station station);

        /// <summary>
        /// Gets a station from the database.
        /// </summary>
        /// <param name="stationId">The station identifier.</param>
        /// <returns>Station.</returns>
        Station GetStation(long stationId);

        /// <summary>
        /// Updates a station in the database.
        /// </summary>
        /// <param name="station">The station.</param>
        /// <returns>The number of rows affected</returns>
        int UpdateStation(Station station);

        /// <summary>
        /// Deletes a station in the database.
        /// </summary>
        /// <param name="stationId">The station id.</param>
        /// <returns>The number of rows affected</returns>
        int DeleteStation(long stationId);

        /// <summary>
        /// Gets all stations in the database.
        /// </summary>
        /// <returns>List{Station}.</returns>
        List<Station> GetAllStation();
    }
}